php forum
php mysql forum
php mysql smarty
 
Page 1 of 3 1 2 3 >
Topic Options
#312682 - 01/14/07 10:49 PM [7.0.x] Top Posters in Last X Days
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Mod Name / Version: Top Posters in X Days

Description: This changes the Top Posters Portal box to reflect top posters in last X days
which keeps the list more current. Otherwise the same people tend to stay on that list.

Working under: 7.0.2

Any pre-requisites: none

Author: JoshPet www.JoshuaPettit.com
for discussion and bugs go to www.ubbdev.com

Date: 1/14/07

Credits: One of my clients for commissioning it

Files Altered: /cache_builders/top_posters.php, /languages/english/island_top_posters.php

Database Altered: none

Info: Make this modification, set the number of days you'd like to use, and clear your cache



Attachments
2339-TopPostersLastXDays.txt (181 downloads)

_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#312689 - 01/15/07 06:32 AM Re: [7.0.x] Top Posters in Last X Days [Re: JoshPet]
Ian_W Offline

Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
Works fine in 7.1 - only difference being the location of the language string.
_________________________
Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Top
#312696 - 01/15/07 07:02 AM Re: [7.0.x] Top Posters in Last X Days [Re: Ian_W]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Looks good Josh, keep up the good work smile
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#312727 - 01/16/07 04:48 PM Re: [7.0.x] Top Posters in Last X Days [Re: Gizmo]
jgeoff Offline
Power User

Registered: 04/05/01
Posts: 97
Loc: NJ

Nice idea!

What if I wanted to have both though?
Could it be converted to a custom island?
_________________________
GangsterBB.NET (Ver. 7.3)
2007 Content Rulez Contest - Honorable Mention
UBB.classic 6.7.2 - RIP
Browser: Firefox 2.0

Top
#312730 - 01/16/07 06:35 PM Re: [7.0.x] Top Posters in Last X Days [Re: jgeoff]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Yes, you'd need to add the appropriate code into your custom island tho. (php code above to the top and the template code down below).
_________________________
- Allen wavey
- What Drives You?

Top
#313273 - 02/25/07 07:54 PM Re: [7.0.x] Top Posters in Last X Days [Re: AllenAyres]
Mark_S Offline
Power User

Registered: 11/15/03
Posts: 86
Loc: UK
Does anyone have the Code for this as Custom Island.
Ive been trying but get an error when i submit it?

Its probably because i havnt split it correctly like Allen sugests.

Thanks in advance.

Mark.

Top
#313276 - 02/25/07 08:22 PM Re: [7.0.x] Top Posters in Last X Days [Re: Mark_S]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
This only works in 7.0; see this for 7.1
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#313278 - 02/26/07 04:51 AM Re: [7.0.x] Top Posters in Last X Days [Re: Gizmo]
Mark_S Offline
Power User

Registered: 11/15/03
Posts: 86
Loc: UK
Gizmo there two diffrent subjects.
I have that one running you linked too.

Ive seen this "Top Posters in Last X Days "
Running on a 7.1 board, Ian W's.

I think its a really neat addon,
but i'm having problems with the code.

Maybe Ian would be so kind to share the code?

Mark.

Top
#313279 - 02/26/07 05:12 AM Re: [7.0.x] Top Posters in Last X Days [Re: Mark_S]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Sorry, it was late when i posted, i was confusing it for another mod; but I haven't heard of this running succuessfully in 7.1 other than ian's forum
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#313287 - 02/26/07 03:53 PM Re: [7.0.x] Top Posters in Last X Days [Re: Gizmo]
Mark_S Offline
Power User

Registered: 11/15/03
Posts: 86
Loc: UK
I'm going to have another go at this tonight.
Probably screw it up lol...

If i get it working will post below. 7.1

Top
#313288 - 02/26/07 04:30 PM Re: [7.0.x] Top Posters in Last X Days [Re: Mark_S]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Should be pretty much the same code, with the exception of Ian's noted language string difference.
_________________________
- Allen wavey
- What Drives You?

Top
#313290 - 02/26/07 05:10 PM Re: [7.0.x] Top Posters in Last X Days [Re: jgeoff]
Mark_S Offline
Power User

Registered: 11/15/03
Posts: 86
Loc: UK
I realised my mistake frown

For what ever reason? ( I blame too much coffee )

I had in my head that it was a custom island add in?

Originally Posted By: jgeoff

What if I wanted to have both though?
Could it be converted to a custom island?


I was trying to get it as a custom island,
so i could have both, but i was being greedy....

So i'm having problems converting it too a custom island.

Summary..

The code works great smile
I cant suss a second island to run at the same time.

Thanks to JoshPet for a better Top Posters.

p.s Is there anyway to modify out a banned user?

Top
#313293 - 02/26/07 07:50 PM Re: [7.0.x] Top Posters in Last X Days [Re: Mark_S]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Yeah, I'm running this on 7.1 sites, no changes.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#313295 - 02/27/07 04:06 PM Re: [7.0.x] Top Posters in Last X Days [Re: Gizmo]
Ian_W Offline

Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
Originally Posted By: Gizmo
Sorry, it was late when i posted, i was confusing it for another mod; but I haven't heard of this running succuessfully in 7.1 other than ian's forum


Runs fine - no issues - just change the string mentioned and you will be fine smile
_________________________
Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Top
#314492 - 06/19/07 09:31 PM Re: [7.0.x] Top Posters in Last X Days [Re: Ian_W]
Carte Blanche Offline
Newbie

Registered: 10/08/06
Posts: 21
Loc: Auckland, NZ
I've made this work with both Top Posters in Last 30 Days and Top Posters overall. Example of both in play

I've taken Josh's instructions and updated them on how to have BOTH on your forums.

Sorta my first foray off my own back...and it's a bit trickier to do with custom islands because of the way the system forces content creation on the customs. Hopefully this works for you smile

Oh, and this is working on 7.1.1


Attachments
2418-Update_to_TopPostersXDays.txt (79 downloads)



Edited by Carte Blanche (06/19/07 09:32 PM)

Top
#314493 - 06/19/07 10:45 PM Re: [7.0.x] Top Posters in Last X Days [Re: Carte Blanche]
sirdude Offline
Enthusiast

Registered: 11/08/03
Posts: 490
Loc: SoCal
nice mod

and i love that dark theme you have...

:rawk:
_________________________

Top
#314626 - 06/28/07 01:43 AM Re: [7.0.x] Top Posters in Last X Days [Re: sirdude]
Ian_W Offline

Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
The original mod works fine in 7.2 smile

Except as previously mentioned the language file is now in /languages/xxxx/portal_islands.php

_________________________
Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Top
#315965 - 10/06/07 10:40 PM Re: [7.0.x] Top Posters in Last X Days [Re: Ian_W]
AshtarRose Offline
Journeyman

Registered: 09/22/05
Posts: 137
Loc: Columbus, OH
I attempted this and I got

Parse error: syntax error, unexpected '<' in /home/riddle6/public_html/hprpg/cache_builders/custom/portal_box_7.php on line 2
_________________________
http://www.riddledindarkness.com * Yeah I need the Crazy Mods.

Top
#315966 - 10/06/07 10:58 PM Re: [7.0.x] Top Posters in Last X Days [Re: AshtarRose]
AshtarRose Offline
Journeyman

Registered: 09/22/05
Posts: 137
Loc: Columbus, OH
Is here anything like 'Top Poster of the Month' out there that could display the top poster of the month instead of a list. Or if I can get this working, can I edit it to do that?
_________________________
http://www.riddledindarkness.com * Yeah I need the Crazy Mods.

Top
#315967 - 10/06/07 11:37 PM Re: [7.0.x] Top Posters in Last X Days [Re: AshtarRose]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Ensure you're pasting content between the EOF lines
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#315968 - 10/07/07 12:29 AM Re: [7.0.x] Top Posters in Last X Days [Re: Gizmo]
AshtarRose Offline
Journeyman

Registered: 09/22/05
Posts: 137
Loc: Columbus, OH
Nah Giz, I put it all under the EOF and nothing works, I get a blank white page
_________________________
http://www.riddledindarkness.com * Yeah I need the Crazy Mods.

Top
#315972 - 10/07/07 09:16 AM Re: [7.0.x] Top Posters in Last X Days [Re: AshtarRose]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
So it's for sure above the bottom EOF; and under the initial EOF>>> ?
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#315973 - 10/07/07 09:17 AM Re: [7.0.x] Top Posters in Last X Days [Re: Gizmo]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
If so, please post the full code you're using.
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#316542 - 12/31/07 11:38 AM Re: [7.0.x] Top Posters in Last X Days [Re: Gizmo]
Ian_W Offline

Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
This needs a rewrite for 7.3 - I have tried, but can't quite get it correct frown frown
_________________________
Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Top
#316668 - 01/29/08 08:05 AM Re: [7.0.x] Top Posters in Last X Days [Re: Ian_W]
Organizer Offline
User

Registered: 08/17/02
Posts: 34
Originally Posted By: Gizmo
So it's for sure above the bottom EOF; and under the initial EOF>>> ?


Got a blank page at first, then noticed that the island was built just not shown...
- - - -
$body = <<<EOF
<?php include("{$config['FULL_PATH']}/cache/top_posters_30.php") ?>
EOF;
- - - -

Note! Carte Blanches instructions might have an error as in the above text it was first called top_post_30.php, had to change to top_posters_30.php as that was my filename at least!
_________________________
Organizer

Top
#316669 - 01/29/08 08:22 AM Re: [7.0.x] Top Posters in Last X Days [Re: Organizer]
Organizer Offline
User

Registered: 08/17/02
Posts: 34
I got another issue with 7.2.2 and the verison from Carte Blanches, the style in the box screws up, if cut and paste as below the backgroun goes black and my default backgroun on all other boxes are white... if I leave more of the original code it end up being either double heading or leave a bit less and I get a box in a box (in both cases then with right styles though)...

Any idea? (code below)

{$tbopen}
{section name=user loop=$users}
<div style="float:right">{$users[user].posts}</div>
<a href="{$config.BASE_URL}/ubbthreads.php?ubb=showprofile&User={$users[user].uid}">{$users[user].name}</a><br />
<div style="clear: both"></div>
{/section}
{$tbclose}
_________________________
Organizer

Top
#316732 - 02/19/08 02:37 PM Re: [7.0.x] Top Posters in Last X Days [Re: Ian_W]
Mark_S Offline
Power User

Registered: 11/15/03
Posts: 86
Loc: UK
Originally Posted By: Ian_W
This needs a rewrite for 7.3 - I have tried, but can't quite get it correct frown frown
My members need to know whos spamming over 30 days.

If this can be sorted for 7.3 it would make alot of my
members very happy.

Still amazed this is not stock.
The best Top Posters ive seen.

Top
#316745 - 02/21/08 06:08 AM Re: [7.0.x] Top Posters in Last X Days [Re: Mark_S]
Ian_W Offline

Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
Indeed - I did try for several hours - got almost there, but the output was in the wrong format/order LOL
_________________________
Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Top
#316761 - 02/28/08 05:15 AM Re: [7.0.x] Top Posters in Last X Days [Re: Ian_W]
Carte Blanche Offline
Newbie

Registered: 10/08/06
Posts: 21
Loc: Auckland, NZ
There may be issues with my tweaks, as I said, it was my first foray into it, and actually, I've turned off the standard and custom islands showing posters.

I do recall I had to do some tweaking to get it to look just right, and stated, it was working in 7.1.1 but I didn't try it out with 7.2.2 and I have no idea how it'll play with 7.3

If I recall, I essentially took the original top posters embedded stuff, created the same thing and tweaked it according to Josh's or someone else's script and named it slight differently so that the original function still existed and my altered one could too. But, heck, that's been some time ago and my brain being all mushy at the moment....bleh.

Top
#316815 - 03/26/08 03:34 PM Re: [7.0.x] Top Posters in Last X Days [Re: Ian_W]
Mark_S Offline
Power User

Registered: 11/15/03
Posts: 86
Loc: UK
Originally Posted By: Ian_W
Indeed - I did try for several hours - got almost there, but the output was in the wrong format/order LOL
Huge thanks wink

You've had a month since the last try.
< tease > You don't quit that easily normally lol

This should be stock smile
Members love the fact is dynamic and changes.

Top
#316823 - 03/28/08 03:21 AM Re: [7.0.x] Top Posters in Last X Days [Re: Mark_S]
Ian_W Offline

Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
Still no joy frown

Sorry about that - would love to have this running in 7.3
_________________________
Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Top
#317078 - 05/28/08 06:59 AM Re: [7.0.x] Top Posters in Last X Days [Re: Ian_W]
willing Offline
User

Registered: 04/17/07
Posts: 42
Does it not work in 7.3?

Top
#317080 - 05/28/08 10:55 AM Re: [7.0.x] Top Posters in Last X Days [Re: willing]
sirdude Offline
Enthusiast

Registered: 11/08/03
Posts: 490
Loc: SoCal
7.3-ized version below:

Php Code:

<?php
// Number of days - Top Posters in X days - Edit as needed
$days = 1;

if (!defined('UBB_MAIN_PROGRAM')) {
	exit;
}
$today = $html -> get_date();
$limittime = ($today - ($days * 86400));

$query = "
	SELECT 
		COUNT(*) as Total, p.USER_ID, u.USER_DISPLAY_NAME, 
		u.USER_MEMBERSHIP_LEVEL, up.USER_NAME_COLOR
	FROM {$config['TABLE_PREFIX']}POSTS p,
			 {$config['TABLE_PREFIX']}USERS u,
			 {$config['TABLE_PREFIX']}USER_PROFILE up
	WHERE u.USER_ID = up.USER_ID
	AND	 p.POST_POSTED_TIME > $limittime
	AND	 p.USER_ID != 1
	AND		p.USER_ID = u.USER_ID
	GROUP BY p.USER_ID ORDER BY Total DESC
	limit {$config['TOP_POSTERS']}
";
$sth = $dbh->do_query($query);
$users = array();
$i = 0;
while(list($total,$uid,$username,$memberlevel,$namecolor) = $dbh->fetch_array($sth)) {
	$users[$i]['namecolor'] = $html->user_color($username, $namecolor, $memberlevel);
	$users[$i]['name'] = $username;
	$users[$i]['posts'] = $total;
	$users[$i]['uid'] = $uid;
	$i++;
}

$smarty->assign("users",$users);

$island = $smarty->fetch("island_top_posters.tpl");

lock_and_write("{$config['FULL_PATH']}/cache/top_posters.php",$island);

@chmod("{$config['FULL_PATH']}/cache/top_posters.php",0666);

?>



/cache_builders/top_posters.php

set $days to the number of days you want and *poof*

this also colorizes the username to be consistent..
_________________________

Top
#317097 - 05/29/08 10:00 PM Re: [7.0.x] Top Posters in Last X Days [Re: sirdude]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Thanks SD, works well thumbsup

Open for suggestions on a shorter title smile
_________________________
- Allen wavey
- What Drives You?

Top
#317104 - 05/30/08 08:43 PM Re: [7.0.x] Top Posters in Last X Days [Re: AllenAyres]
willing Offline
User

Registered: 04/17/07
Posts: 42
Does it look like what is in the top right on this forum?

Looks good.

So what exactly do I need to do with the above code for 7.3? Is that a new island and exactly what do I need to put in the box? Would be a big help!

thank you

Top
#317106 - 05/30/08 09:42 PM Re: [7.0.x] Top Posters in Last X Days [Re: willing]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
You take sd's code and put it in place of the code in the /cache_builders/top_posters.php file. Upload it and edit the post islands language file if you want to change the title.
_________________________
- Allen wavey
- What Drives You?

Top
#317107 - 05/30/08 10:05 PM Re: [7.0.x] Top Posters in Last X Days [Re: AllenAyres]
willing Offline
User

Registered: 04/17/07
Posts: 42
It works!

Great.

Can I ask - how often is this data refreshed?

Thank you.

Top
#317110 - 05/31/08 03:58 AM Re: [7.0.x] Top Posters in Last X Days [Re: willing]
Carte Blanche Offline
Newbie

Registered: 10/08/06
Posts: 21
Loc: Auckland, NZ
I think you set that in your config for islands by saying how long it should be cached for.

Top
#317111 - 05/31/08 04:04 AM Re: [7.0.x] Top Posters in Last X Days [Re: Carte Blanche]
Carte Blanche Offline
Newbie

Registered: 10/08/06
Posts: 21
Loc: Auckland, NZ
Also, the only problem I have with this is that this forces you to replace the top posters with top posters over the last x days.

As stated previously, I was getting too many people trying to push their epeens on post counts over the long haul that I disabled both of my islands showing top posters overall and top posters over last 30 days, but I think I may bring back just the X days variant because of it's dynamic non accruing nature. I'll see if I can't get it working again in a custom island instead of having it overwriting the original top posters one.

Btw, just as a matter of principles too, I've also disabled showing post counts on my forums because of the idiotic nature of some just trying to push post counts higher with "+1" etc.

Top
#317113 - 05/31/08 05:33 AM Re: [7.0.x] Top Posters in Last X Days [Re: Carte Blanche]
Carte Blanche Offline
Newbie

Registered: 10/08/06
Posts: 21
Loc: Auckland, NZ
Ok, here's what I've come up with and it's seemingly working.

To make it as a custom island, first, you need to create a template file, I called mine "island_top_posters_30.tpl"

This file should have this content in it.

Php Code:

{* Script Version 7.3 *}

<?php if(!defined('UBB_MAIN_PROGRAM')) exit; ?>
{$tbopen}
{section name=user loop=$users}
<div style="float:right">{$users[user].posts}</div>
<a href="{$config.BASE_URL}/ubbthreads.php?ubb=showprofile&amp;User={$users[user].uid}">{$users[user].name}</a><br />
<div style="clear: both"></div>
{/section}
{$tbclose}

 


This file should be saved in /templates/default directory.

You can name it whatever you want, you just need to match the name in this next bit, which is what you will put into your custom island.

In the custom island, replace the entire contents with the following code...

Php Code:

/* PHP CODE HERE, IF NECESSARY */
// Number of days - Top Posters in X days - Edit as needed
$days = 30;

if (!defined('UBB_MAIN_PROGRAM')) {
exit;
}

$today = $html -> get_date();
$limittime = ($today - ($days * 86400));


$query = "
SELECT
COUNT(*) as total, p.USER_ID, u.USER_DISPLAY_NAME,
u.USER_MEMBERSHIP_LEVEL, up.USER_NAME_COLOR
FROM {$config['TABLE_PREFIX']}POSTS as p,
{$config['TABLE_PREFIX']}USERS as u,
{$config['TABLE_PREFIX']}USER_PROFILE as up

WHERE u.USER_ID = up.USER_ID
AND p.POST_POSTED_TIME > $limittime
AND p.USER_ID != 1
AND p.USER_ID = u.USER_ID
GROUP BY p.USER_ID ORDER BY total DESC
limit {$config['TOP_POSTERS']}
";
$sth = $dbh->do_query($query);
$users = array();
$i = 0;
while(list($total,$uid,$username,$memberlevel,$namecolor) = $dbh->fetch_array($sth)) {
$users[$i]['namecolor'] = $html->user_color($username, $namecolor, $memberlevel);
$users[$i]['name'] = $username;
$users[$i]['posts'] = $total;
$users[$i]['uid'] = $uid;
$i++;
} // end while


$smarty->assign("users",$users);

$island = $smarty->fetch("island_top_posters_30.tpl");

lock_and_write("{$config['FULL_PATH']}/cache/top_post_30.php",$island);

@chmod("{$config['FULL_PATH']}/cache/top_post_30.php",0666);


/* DO NOT CHANGE THE LINE BELOW */
$body = <<<EOF
<?php include("/your server path here/cache/top_post_30.php") ?>



EOF;
/* DO NOT CHANGE THE LINE ABOVE */
 


What it does is when it fires based on the timings you've placed, it uses the "island_top_posters_30.tpl" file as a template to create some html code. it then saves this code in your cache directory as "top_post_30.php" or you can change this to be whatever you want as well. It also chmods it so it's usable, and then creates html content and just sucks in the contents of that file for display.

Thing to note is that you need to use your own server path rather than what I wrote near the bottom..i.e. replace "your server path here" with your server path.

I am by no means a fully proficient php coder, I'm more an engineer who can take existing things and make tweaks to get what I want out of them, so, if I've got "not so elegant" codign practices...this is why. Lord knows I couldn't sit down and yield this stuff from scratch.

If one of you more proficient coders notices any major issues, by all means feel free to post corrections...I'm all about function, not form and won't have feelings hurt smile

One final note, the # of people listed is pulled from the Portal Settings page, the # contained within the Top Posters field. I think it makes for a nice symmetry that if you're running both total top posters and top posters over X days that they have the same # of users listed.

Top
#317121 - 05/31/08 11:39 AM Re: [7.0.x] Top Posters in Last X Days [Re: Carte Blanche]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Thanks CB smile
_________________________
- Allen wavey
- What Drives You?

Top
#317204 - 06/11/08 10:58 AM Re: [7.0.x] Top Posters in Last X Days [Re: AllenAyres]
Grymmie Offline
Lurker

Registered: 12/11/07
Posts: 7
Is there any way of modifying the code CB so that you can remove a specific user from being included?

I.E.

With the new newsfeed mod, the admin could recieve hundresd if not thousands of posted credits per day. This of course would upset the ratio, and I would ultimately like to keep it with those people actually making posts versus bots.

Thanks.

Top
#317210 - 06/11/08 12:27 PM Re: [7.0.x] Top Posters in Last X Days [Re: Grymmie]
sirdude Offline
Enthusiast

Registered: 11/08/03
Posts: 490
Loc: SoCal
easy peasy smile

find:
Sql Query:
AND	 p.USER_ID != 1


change to
Sql Query:
AND	 p.USER_ID NOT IN (1,xx,yy)


where xx and yy are member numbers you don't want in the calcs..

so assume there are 3 members you don't want included (1 is always included) -- ids 10, 69, 443

the statement would read
Sql Query:
AND	 p.USER_ID NOT IN(1,10,69,443)


*poof* done smile
_________________________

Top
#317212 - 06/11/08 05:42 PM Re: [7.0.x] Top Posters in Last X Days [Re: sirdude]
Grymmie Offline
Lurker

Registered: 12/11/07
Posts: 7
SIR DUDE YOUR THE BEST!

Thanks

Top
#317214 - 06/11/08 08:49 PM Re: [7.0.x] Top Posters in Last X Days [Re: Grymmie]
Carte Blanche Offline
Newbie

Registered: 10/08/06
Posts: 21
Loc: Auckland, NZ
Heh, actually, I might use something like that against some of my post farmers too. Just not sure it if would encourage their spammming even more to try to get back on....

Top
Page 1 of 3 1 2 3 >



Moderator:  sirdude 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks